package tianrun.ziguan.api.calculate.config.service.influxdb;

import org.influxdb.dto.Query;
import tianrun.ziguan.api.calculate.config.service.influxdb.impl.InsertValue;

import java.util.Collection;
import java.util.List;

public interface IInfluxDbService {
    <T> List<T> query(String sourceName, Query query, Class<T> clazz);

    <T> List<T> queryTodayData(String sourceName, String sql, Class<T> clazz);

    boolean insert(String sourceName,String measurement,String label, Long time, Double value);
    boolean insertBatch(String sourceName, String dbName,Collection<InsertValue> values);
    boolean deleteLabelByDate(String sourceName,String dbName,String assetNum,String label,long startDate,long endDate);
}
